<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<meta content="text/html;charset=UTF-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
	<meta http-equiv ="Pragma" content = "no-cache"/>
	<meta http-equiv="Cache-Control" content="no cache" />
	<meta http-equiv="Expires" content="0" />
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
	<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
	<meta name="apple-mobile-web-app-capable" content="yes"/>
	<meta name="format-detection" content="telephone=no"/>
	<script src="https://cdn.bootcss.com/pace/1.0.2/pace.min.js"></script>
	<link href="https://cdn.bootcss.com/pace/1.0.2/themes/pink/pace-theme-flash.css" rel="stylesheet">
	<link rel="stylesheet" type="text/css" href="/static/fsLayui-1.8.2/plugins/layui/css/layui.css" media="all"/>
	<link rel="stylesheet" type="text/css" href="/static/fsLayui-1.8.2/css/fs.css" media="all"/>
	<script type="text/javascript" src="/static/fsLayui-1.8.2/plugins/layui/layui.js"></script>
	<script type="text/javascript" src="/static/fsLayui-1.8.2/plugins/jquery/jquery.min.js"></script>
	<script type="text/javascript" src="/static/fsLayui-1.8.2/plugins/frame/js/fsDict.js?v=1.5.0"></script>
	<script type="text/javascript" src="/static/fsLayui-1.8.2/plugins/frame/js/fs.js?v=1.5.0"></script>
	<script type="text/javascript" src="/static/fsLayui-1.8.2/plugins/frame/js/frame.js?v=1.5.0"></script>
</head>
<body>
<div class="layui-fluid">
  <div class="layui-row layui-col-space1">
  <div class="layui-col-md12">
  	 	<div class="layui-form-query">
			<form class="layui-form" id="query_form">
				<div class="layui-form-item">
					<input type="hidden" id="funcId" name="funcId" autocomplete="off" class="layui-input"/>
					<div class="layui-inline">
						<label class="layui-form-mid">评论用户：</label>
						<div class="layui-input-inline" style="width: 300px;">
							<input type="text" name="nickname" autocomplete="off" function="query" tableId="fsDatagrid" class="layui-input"/>
							<input type="hidden" name="news" autocomplete="off" class="layui-input"/>
						</div>
					</div>
					<div class="layui-inline">
						<label class="layui-form-mid">发布时间：</label>
						<div class="layui-input-inline" style="">
							<input type="text" name="commentDates" autocomplete="off" class="layui-input fsDate" dateRange="1" placeholder=" - "/>
						</div>
					</div>
					
					<div class="layui-inline">
						<div class="layui-input-inline">
							<button class="layui-btn layui-btn-sm" type="button" function="query" tableId="fsDatagrid"><i class="layui-icon">&#xe615;</i>查询</button>
						</div>
					</div>
				</div>
			</form>
		</div>
  	 </div>
     <div class="layui-col-md12">
		<button class="layui-btn layui-btn-danger" function="submit" url="/admin/comment/delete" isMutiDml="1" isConfirm="1" confirmMsg="是否确定删除选中的数据？" inputs="commentId:">
		  <i class="layui-icon">&#xe640;</i>批量删除
		</button>
		<button class="layui-btn" function="refresh">
		  <i class="layui-icon">&#x1002;</i>刷新
		</button>
      </div>
  	 <div class="layui-col-md12">
  	 	<div class="layui-row grid-demo">
	      <div class="layui-col-md12">
	         <table id="fsDatagrid" lay-filter="fsDatagrid" class="fsDatagrid" clickRenderTable="fsDatagrid2" clickRenderTableInputs="comment:$commentId" isLoad="1" defaultForm="query_form" url="/admin/comment/list" isPage="1" height="350"></table>

				
		<div class="fsDatagridCols">
			<p type="numbers" title="#"/>
			<p checkbox="true"/>
		    <p field="commentId" align="center" title="评论ID" sort="true"/>
		    <p field="content" align="center" title="评论内容" />
		    <p field="article" align="center" title="评论主题" templet="#articleTpl"/>
		    <p field="user" align="center" title="评论用户" sort="true" templet="#userTpl"/>
		    <p field="commentDate" align="center" title="评论时间" sort="true"/>
		    <p fixed="right" align="center" toolbar="#barDemo" title="操作"/>
		</div>
		
			<script type="text/html" id="barDemo">
  				<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="submit" url="/admin/comment/delete" isConfirm="1" confirmMsg="是否确定删除当前记录？" inputs="commentId:">删除</a>
			</script>
	      </div>
	    </div>
  	 </div>
  	 
  	 <hr class="layui-bg-red">
  	 
  	 <div class="layui-col-md12">
  	 	<div class="layui-form-query">
			<form class="layui-form" id="query_form2">
			</form>
		</div>
  	 </div>
  	 <div class="layui-col-md12">
    	<div id="table_buttion_div">
			<button class="layui-btn layui-btn-sm" function="refresh" tableId="fsDatagrid2">
			  <i class="layui-icon">&#x1002;</i>刷新
			</button>
    	</div>
    </div>
  	 <div class="layui-col-md12">
  	 	<table id="fsDatagrid2" class="fsDatagrid" lay-filter="fsDatagrid2" url="/admin/reply/list" isLoad="0" defaultForm="query_form2" height="270" isPage="1">
		</table>
		
		<div class="fsDatagridCols">
			<p type="numbers" title="#"/>
		    <p field="replyId" align="center" title="回复ID" sort="true"/>
		    <p field="content" align="center" title="回复内容"/>
		    <p field="user" align="center" title="评论用户" sort="true" templet="#userTpl"/>
		    <p field="replyDate" align="center" title="评论时间" sort="true"/>
		    <p fixed="right" align="center" toolbar="#barDemo2" title="操作" />
		</div>
		
		<script type="text/html" id="userTpl">
				<img src="{{d.user.headPortrait}}" class="layui-nav-img" />{{d.user.nickname}}
		</script>
		
		<script type="text/html" id="articleTpl">
				{{#  if(d.article == null){ }}
					<span class="layui-badge layui-bg-red" style="undefined">留言</span>
				{{# } else if(d.article != null){ }}
  			    	{{d.article.title}}
 				{{#  } }}
			</script>
		
		
		<script type="text/html" id="barDemo2">
 			<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="submit" isConfirm="1" url="/admin/reply/delete" inputs="replyId:">删除</a>
		</script>

  	 </div>

  </div>
</div>
</body>
</html>
